<template>
  <el-menu
    :default-active="active"
    class="el-menu-vertical-demo"
    router
  >
    <el-menu-item index="/">
      <i class="el-icon-s-home" />
      <span>首页</span>
    </el-menu-item>
    <el-menu-item index="/bike">
      <i class="el-icon-bicycle" />
      <span>单车管理</span>
    </el-menu-item>
    <el-menu-item index="/user">
      <i class="el-icon-user" />
      <span>用户管理</span>
    </el-menu-item>
    <el-menu-item index="/order">
      <i class="el-icon-document" />
      <span>订单管理</span>
    </el-menu-item>
    <el-menu-item index="/maintenance">
      <i class="el-icon-setting" />
      <span>运维管理</span>
    </el-menu-item>
    <el-menu-item index="/profile">
      <i class="el-icon-user-solid" />
      <span>个人中心</span>
    </el-menu-item>
  </el-menu>
</template>
<script setup lang="ts">
import { useRoute } from 'vue-router'
const route = useRoute()
const active = route.path
</script>
<style scoped>
.el-menu-vertical-demo {
  height: 100vh;
  border-right: none;
}
</style> 